package com.hwl.demo12.entity;

import com.hwl.demo12.service.State;
import com.hwl.demo12.service.impl.ForenoonState;

/**
 * 工作类
 *
 * @author sentry
 * @since 2023-03-20
 */
public class Work {

    private State current;
    private int hour;
    private boolean workFinished = false;

    public Work() {
        this.current = new ForenoonState();
    }

    public void setState(State value) {
        this.current = value;
    }

    public void writeProgram() {
        this.current.writeProgram(this);
    }

    public State getCurrent() {
        return current;
    }

    public void setCurrent(State current) {
        this.current = current;
    }

    public boolean isWorkFinished() {
        return workFinished;
    }

    public void setWorkFinished(boolean workFinished) {
        this.workFinished = workFinished;
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }
}
